#include <stdio.h>
#include <iostream>

#include <opencv2/opencv.hpp>

int main()
{
	cv::VideoCapture vcap("D:\\MyProjects\\Data\\video.avi");

	if (!vcap.isOpened())
	{
		std::cout << "Cannot open a video file" << std::endl;
	}

	while (1)
	{
		cv::Mat img;
		if (!vcap.read(img))
		{
			std::cout << "No Frame" << std::endl;
			cv::waitKey();
			return 0;
		}

		imshow("Video Output",img);
	}
	return 1;
}